import { AnimationClip } from "cc";
import State from "../../../Base/State";
import { StateMachine } from "../../../Base/StateMachine";
import { DIRECTION_ENUM } from "../../../Enums";
import DirectionSubStateMachine from "../../../Base/DirectionSubStateMachine";

const BASE_PATH = 'texture/woodenskeleton/idle'

export default class IdleSubStateMachine extends DirectionSubStateMachine {

  constructor(fsm: StateMachine) {
    super(fsm)
    this.stateMachines.set(DIRECTION_ENUM.UP, new State(fsm,`${BASE_PATH}/top`,AnimationClip.WrapMode.Loop))
    this.stateMachines.set(DIRECTION_ENUM.DOWN,new State(fsm,`${BASE_PATH}/bottom`,AnimationClip.WrapMode.Loop))
    this.stateMachines.set(DIRECTION_ENUM.LEFT,new State(fsm,`${BASE_PATH}/left`,AnimationClip.WrapMode.Loop))
    this.stateMachines.set(DIRECTION_ENUM.RIGHT,new State(fsm,`${BASE_PATH}/right`,AnimationClip.WrapMode.Loop))
  }
}
